ComponentOne PdfViewer for UWP
Key Features / Loading Encrypted Files
In This Topic
    Loading Encrypted Files
    In This Topic

    You can open encrypted files using the C1PdfViewer so long as you have the password that the file was encrypted with. To load password protected PDF documents use the LoadDocument or LoadDocumentAsync methods with the password as a parameter.

    C#
    Copy Code
    string password = "password";
    await pdfViewer.LoadDocumentAsync(stream, password); 
    

    For a complete example that shows how to open encrypted and non-encrypted files together, see the topic Opening Potentially Protected Files.